﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using C1.Win.C1Input;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_HopDongMua : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("AdvDoiTuong")]
        private ADVObjects _AdvDoiTuong;
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTab2")]
        private C1DockingTab _C1DockingTab2;
        [AccessedThroughProperty("C1DockingTab3")]
        private C1DockingTab _C1DockingTab3;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("C1DockingTabPage3")]
        private C1DockingTabPage _C1DockingTabPage3;
        [AccessedThroughProperty("CboDaiDien")]
        private ComboBox _CboDaiDien;
        [AccessedThroughProperty("CboHinhThucThanhToan")]
        private ComboBox _CboHinhThucThanhToan;
        [AccessedThroughProperty("CboLoaiTien")]
        private ComboBox _CboLoaiTien;
        [AccessedThroughProperty("CmdAdd")]
        private ToolStripButton _CmdAdd;
        [AccessedThroughProperty("CmdAddRow")]
        private Button _CmdAddRow;
        [AccessedThroughProperty("CmdDel")]
        private ToolStripButton _CmdDel;
        [AccessedThroughProperty("CmdDelRow")]
        private Button _CmdDelRow;
        [AccessedThroughProperty("CmdEdit")]
        private ToolStripButton _CmdEdit;
        [AccessedThroughProperty("CmdExit")]
        private ToolStripButton _CmdExit;
        [AccessedThroughProperty("CmdFind")]
        private ToolStripButton _CmdFind;
        [AccessedThroughProperty("CmdHelp")]
        private ToolStripButton _CmdHelp;
        [AccessedThroughProperty("CmdPrint")]
        private ToolStripButton _CmdPrint;
        [AccessedThroughProperty("CmdSave")]
        private ToolStripButton _CmdSave;
        [AccessedThroughProperty("CmdUnsave")]
        private ToolStripButton _CmdUnsave;
        [AccessedThroughProperty("Label1")]
        private Label _Label1;
        [AccessedThroughProperty("Label10")]
        private Label _Label10;
        [AccessedThroughProperty("Label11")]
        private Label _Label11;
        [AccessedThroughProperty("Label12")]
        private Label _Label12;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("Label14")]
        private Label _Label14;
        [AccessedThroughProperty("Label15")]
        private Label _Label15;
        [AccessedThroughProperty("Label16")]
        private Label _Label16;
        [AccessedThroughProperty("Label17")]
        private Label _Label17;
        [AccessedThroughProperty("Label2")]
        private Label _Label2;
        [AccessedThroughProperty("Label22")]
        private Label _Label22;
        [AccessedThroughProperty("Label23")]
        private Label _Label23;
        [AccessedThroughProperty("Label3")]
        private Label _Label3;
        [AccessedThroughProperty("Label4")]
        private Label _Label4;
        [AccessedThroughProperty("Label5")]
        private Label _Label5;
        [AccessedThroughProperty("Label6")]
        private Label _Label6;
        [AccessedThroughProperty("Label7")]
        private Label _Label7;
        [AccessedThroughProperty("Label8")]
        private Label _Label8;
        [AccessedThroughProperty("Label9")]
        private Label _Label9;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("Panel2")]
        private Panel _Panel2;
        [AccessedThroughProperty("Panel3")]
        private Panel _Panel3;
        [AccessedThroughProperty("Panel4")]
        private Panel _Panel4;
        [AccessedThroughProperty("Panel5")]
        private Panel _Panel5;
        [AccessedThroughProperty("ToolStrip1")]
        private ToolStrip _ToolStrip1;
        [AccessedThroughProperty("ToolStripButton1")]
        private ToolStripSeparator _ToolStripButton1;
        [AccessedThroughProperty("ToolStripSeparator1")]
        private ToolStripSeparator _ToolStripSeparator1;
        [AccessedThroughProperty("ToolStripSeparator2")]
        private ToolStripSeparator _ToolStripSeparator2;
        [AccessedThroughProperty("ToolStripSeparator3")]
        private ToolStripSeparator _ToolStripSeparator3;
        [AccessedThroughProperty("txtChucVu")]
        private TextBox _txtChucVu;
        [AccessedThroughProperty("txtDiaChi")]
        private TextBox _txtDiaChi;
        [AccessedThroughProperty("txtDienGiai")]
        private TextBox _txtDienGiai;
        [AccessedThroughProperty("txtDienThoai")]
        private TextBox _txtDienThoai;
        [AccessedThroughProperty("txtFax")]
        private TextBox _txtFax;
        [AccessedThroughProperty("txtMST")]
        private TextBox _txtMST;
        [AccessedThroughProperty("txtNgayHopDong")]
        private DateTimePicker _txtNgayHopDong;
        [AccessedThroughProperty("txtNgayThanhLy")]
        private DateTimePicker _txtNgayThanhLy;
        [AccessedThroughProperty("txtNgayThanhToan")]
        private DateTimePicker _txtNgayThanhToan;
        [AccessedThroughProperty("txtSoHD")]
        private TextBox _txtSoHD;
        [AccessedThroughProperty("TxtTienHang")]
        private C1NumericEdit _TxtTienHang;
        [AccessedThroughProperty("TxtTienHangNT")]
        private C1NumericEdit _TxtTienHangNT;
        [AccessedThroughProperty("TxtTienThue")]
        private C1NumericEdit _TxtTienThue;
        [AccessedThroughProperty("TxtTienThueNT")]
        private C1NumericEdit _TxtTienThueNT;
        [AccessedThroughProperty("TxtTongThanhToan")]
        private C1NumericEdit _TxtTongThanhToan;
        [AccessedThroughProperty("TxtTongThanhToanNT")]
        private C1NumericEdit _TxtTongThanhToanNT;
        [AccessedThroughProperty("txtTyGia")]
        private C1NumericEdit _txtTyGia;
        [AccessedThroughProperty("txtTyLeThue")]
        private C1NumericEdit _txtTyLeThue;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private string cFrmFormat;
        public string cFrmKhoa;
        private string cFrmKhoaOld;
        private string cFrmTask;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private bool mEnabledControl;
        private clsHopDong objHD;
        private clsHopDongChiTiet objHDCT;
        private clsDMLoaiTien ObjLT;

        public Frm_HopDongMua()
        {
            base.Load += new EventHandler(this.Frm_HopDongMua_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.cFrmKhoa = "";
            this.cFrmKhoaOld = "";
            this.objHD = new clsHopDong();
            this.objHDCT = new clsHopDongChiTiet();
            this.cFrmTask = "";
            this.ObjLT = new clsDMLoaiTien();
            this.InitializeComponent();
        }

        private void AdvDoiTuong_ValueChanged(object sender, EventArgs e)
        {
            clsDMDoiTuong tuong = new clsDMDoiTuong();
            tuong.Load(this.AdvDoiTuong.Value);
            this.LoadDSDaiDien(this.AdvDoiTuong.Value);
            this.txtDiaChi.Text = tuong.DiaChi.Trim();
            this.txtMST.Text = tuong.MaSoThue.Trim();
            this.txtDienThoai.Text = tuong.DienThoai.Trim();
            this.txtFax.Text = tuong.Fax.Trim();
        }

        private void CboDaiDien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboDaiDien.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
            {
                clsDMLienHeDoiTuong tuong = new clsDMLienHeDoiTuong();
                tuong.Load(this.CboDaiDien.SelectedValue.ToString().Trim());
                this.txtChucVu.Text = tuong.ChucDanh;
            }
        }

        private void CboLoaiTien_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                this.txtTyGia.Value = 0;
            }
            else
            {
                string strCode = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                if (strCode != "")
                {
                    this.ObjLT.LoadByCode(strCode);
                    if (this.ObjLT.SoLe > 0)
                    {
                        this.cFrmFormat = modGeneral.H_FORMATNUMBER + "." + LVYModule.sRight("0000000000", this.ObjLT.SoLe);
                    }
                    if (this.ObjLT.TienViet == 1)
                    {
                        this.txtTyGia.Enabled = false;
                    }
                    else
                    {
                        this.txtTyGia.Enabled = true;
                    }
                    this.txtTyGia.Value = this.ObjLT.TyGia;
                    this.FormatNumber();
                    this.TinhTong();
                }
            }
        }

        public bool CheckGrid()
        {
            if (this.VSlist.Rows.Count == 1)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn chưa nhập h\x00e0ng h\x00f3a hay dịch vụ!", ""));
                this.CmdAddRow.Focus();
                return false;
            }
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Kh\x00f4ng để trống h\x00e0ng h\x00f3a hay dịch vụ!", ""));
                    this.VSlist.Focus();
                    this.VSlist.Select(i, 1);
                    return false;
                }
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    LVYModule.ShowWarning(modGeneral.Tranlated("Chưa chọn đơn vị t\x00ednh!", ""));
                    this.VSlist.Focus();
                    this.VSlist.Select(i, 3);
                    return false;
                }
            }
            return true;
        }

        public bool CheckIvalid()
        {
            if (!LVYModule.CheckDateLock(LVYModule.Date2Char(this.txtNgayHopDong.Text)))
            {
                return false;
            }
            if (LVYModule.ReturnIfNull(this.txtSoHD.Text, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Số hợp đồng kh\x00f4ng được để trống! Bạn vui l\x00f2ng nhập số hợp đồng.", ""));
                this.txtSoHD.Focus();
                return false;
            }
            if (this.objHD.IsDuplicateVoucherNo(this.txtSoHD.Text, this.cFrmKhoa))
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Số hợp đồng bị tr\x00f9ng! Bạn vui l\x00f2ng nhập số hợp đồng kh\x00e1c.", ""));
                this.txtSoHD.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập loại nguy\x00ean tệ!", ""));
                this.CboLoaiTien.Focus();
                return false;
            }
            if (Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 0, modGeneral.TypeOfValue.Nothing)) == 0.0)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập tỷ gi\x00e1 nguy\x00ean tệ!", ""));
                this.txtTyGia.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboHinhThucThanhToan.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập loại h\x00ecnh thức thanh to\x00e1n!", ""));
                this.CboHinhThucThanhToan.Focus();
                return false;
            }
            if (LVYModule.ReturnIfNull(this.AdvDoiTuong.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn vui l\x00f2ng nhập nh\x00e0 cung cấp!", ""));
                this.AdvDoiTuong.Focus();
                return false;
            }
            if (!this.CheckGrid())
            {
                return false;
            }
            return true;
        }

        private void CmdAdd_Click(object sender, EventArgs e)
        {
            if (this.cFrmKhoa.Trim() != "")
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
            }
            this.EmptyData();
            this.cFrmKhoa = modGeneral.CreatKey("CO_HopDong", 15, "M");
            this.CboLoaiTien.SelectedValue = modGeneral.H_CURRENCY;
            this.EnabledControl = true;
            this.txtSoHD.Focus();
            this.cFrmTask = "I";
        }

        private void CmdAddRow_Click(object sender, EventArgs e)
        {
            if (!Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(LVYModule.ReturnIfNull(this.VSlist[this.VSlist.Rows.Count - 1, 1].ToString(), "", modGeneral.TypeOfValue.Nothing), "", false))
            {
                this.VSlist.AddItem("");
                this.VSlist[this.VSlist.Rows.Count - 1, 1] = "";
                this.VSlist.Focus();
            }
        }

        private void CmdDelRow_Click(object sender, EventArgs e)
        {
            if (this.VSlist.Rows.Count != 1)
            {
                this.VSlist.RemoveItem(this.VSlist.Row);
            }
        }

        private void CmdEdit_Click(object sender, EventArgs e)
        {
            if (LVYModule.CheckDateLock(LVYModule.Date2Char(this.txtNgayHopDong.Text)) && (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != ""))
            {
                this.cFrmKhoaOld = this.cFrmKhoa;
                this.cFrmTask = "U";
                this.EnabledControl = true;
            }
        }

        private void CmdExit_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        private void CmdFind_Click(object sender, EventArgs e)
        {
            MyProject.Forms.Frm_HopDongMuaList.Dispose();
            MyProject.Forms.Frm_HopDongMuaList.ShowDialog();
            MyProject.Forms.Frm_HopDongMuaList.BringToFront();
        }

        private void CmdSave_Click(object sender, EventArgs e)
        {
            this.VSlist.Focus();
            if (this.CheckIvalid())
            {
                if (!this.SaveDetails())
                {
                    this.objHD.ClearTemp(this.cFrmKhoa);
                }
                else if (!this.UpdateData())
                {
                    this.objHD.ClearTemp(this.cFrmKhoa);
                }
                else
                {
                    this.objHD.ClearTemp(this.cFrmKhoa);
                    this.cFrmTask = "";
                    this.EnabledControl = false;
                }
            }
        }

        private void CmdUnsave_Click(object sender, EventArgs e)
        {
            if (LVYModule.ReturnIfNull(this.cFrmKhoaOld, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
            {
                this.cFrmKhoa = this.cFrmKhoaOld;
                this.ShowData(this.cFrmKhoa);
            }
            else
            {
                this.EmptyData();
            }
            this.cFrmTask = "";
            this.EnabledControl = false;
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            try
            {
                if (disposing && (this.components != null))
                {
                    this.components.Dispose();
                }
            }
            finally
            {
                base.Dispose(disposing);
            }
        }

        public void EmptyData()
        {
            this.txtSoHD.Text = "";
            this.txtNgayHopDong.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
            this.txtNgayThanhToan.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
            this.txtNgayThanhLy.Text = Strings.Format(DateAndTime.Today, "dd/MM/yyyy");
            this.CboLoaiTien.SelectedValue = "";
            this.CboHinhThucThanhToan.SelectedValue = "";
            this.txtTyGia.Value = 0;
            this.txtTyLeThue.Value = 0;
            this.txtDienGiai.Text = "";
            this.AdvDoiTuong.Value = "";
            this.CboDaiDien.SelectedValue = "";
            this.txtChucVu.Text = "";
            this.txtDiaChi.Text = "";
            this.txtMST.Text = "";
            this.txtDienThoai.Text = "";
            this.txtFax.Text = "";
            this.VSlist.Select(0, 1);
            this.VSlist.Rows.Count = 1;
            this.TxtTienHangNT.Value = 0;
            this.TxtTienHang.Value = 0;
            this.TxtTienThueNT.Value = 0;
            this.TxtTienThue.Value = 0;
            this.TxtTongThanhToan.Value = 0;
            this.TxtTongThanhToanNT.Value = 0;
        }

        public void FormatNumber()
        {
            LVYModule.advFormatNumber(this.txtTyGia, this.cFrmFormat);
            LVYModule.advFormatNumber(this.txtTyLeThue, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienHangNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienHang, modGeneral.H_FORMATNUMBER);
            LVYModule.advFormatNumber(this.TxtTienThueNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTienThue, modGeneral.H_FORMATNUMBER);
            LVYModule.advFormatNumber(this.TxtTongThanhToanNT, this.cFrmFormat);
            LVYModule.advFormatNumber(this.TxtTongThanhToan, modGeneral.H_FORMATNUMBER);
            this.VSlist.Cols[4].Format = this.cFrmFormat;
            this.VSlist.Cols[5].Format = this.cFrmFormat;
            this.VSlist.Cols[6].Format = this.cFrmFormat;
            this.VSlist.Cols[7].Format = this.cFrmFormat;
        }

        private void Frm_HopDongMua_Load(object sender, EventArgs e)
        {
            this.Cursor = Cursors.WaitCursor;
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                this.Cursor = Cursors.Default;
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.EnabledControl = false;
                this.KeyPreview = true;
                this.VSlist.Cols[3].DataMap = LVYModule.MapDataDanhMuc(modGeneral.ListDanhMuc.DonViTinh);
                this.cFrmFormat = modGeneral.H_FORMATNUMBER;
                BuildComboModule.BuildCombo(this.CboLoaiTien, modGeneral.ListDanhMuc.LoaiTien, false, "", "");
                BuildComboModule.BuildCombo(this.CboHinhThucThanhToan, modGeneral.ListDanhMuc.PhuongThucThanhToan, false, "", "");
                if (LVYModule.ReturnIfNull(this.cFrmKhoa, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.ShowData(this.cFrmKhoa);
                }
                this.Cursor = Cursors.Default;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_HopDongMua));
            this.ToolStrip1 = new ToolStrip();
            this.CmdAdd = new ToolStripButton();
            this.CmdEdit = new ToolStripButton();
            this.ToolStripSeparator2 = new ToolStripSeparator();
            this.CmdSave = new ToolStripButton();
            this.CmdUnsave = new ToolStripButton();
            this.ToolStripSeparator1 = new ToolStripSeparator();
            this.CmdFind = new ToolStripButton();
            this.CmdPrint = new ToolStripButton();
            this.ToolStripButton1 = new ToolStripSeparator();
            this.CmdDel = new ToolStripButton();
            this.ToolStripSeparator3 = new ToolStripSeparator();
            this.CmdExit = new ToolStripButton();
            this.CmdHelp = new ToolStripButton();
            this.Panel1 = new Panel();
            this.C1DockingTab2 = new C1DockingTab();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.txtDienThoai = new TextBox();
            this.txtFax = new TextBox();
            this.Label15 = new Label();
            this.Label14 = new Label();
            this.txtMST = new TextBox();
            this.Label13 = new Label();
            this.txtDiaChi = new TextBox();
            this.Label12 = new Label();
            this.txtChucVu = new TextBox();
            this.Label11 = new Label();
            this.Label9 = new Label();
            this.Label8 = new Label();
            this.Panel2 = new Panel();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.txtTyLeThue = new C1NumericEdit();
            this.Label4 = new Label();
            this.txtTyGia = new C1NumericEdit();
            this.Label10 = new Label();
            this.CboHinhThucThanhToan = new ComboBox();
            this.CboLoaiTien = new ComboBox();
            this.txtNgayThanhLy = new DateTimePicker();
            this.Label17 = new Label();
            this.txtNgayThanhToan = new DateTimePicker();
            this.Label7 = new Label();
            this.txtNgayHopDong = new DateTimePicker();
            this.Label3 = new Label();
            this.Label2 = new Label();
            this.Label6 = new Label();
            this.txtSoHD = new TextBox();
            this.Label1 = new Label();
            this.Label16 = new Label();
            this.txtDienGiai = new TextBox();
            this.Panel3 = new Panel();
            this.C1DockingTab3 = new C1DockingTab();
            this.C1DockingTabPage3 = new C1DockingTabPage();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.Panel4 = new Panel();
            this.Panel5 = new Panel();
            this.TxtTongThanhToanNT = new C1NumericEdit();
            this.TxtTongThanhToan = new C1NumericEdit();
            this.Label23 = new Label();
            this.TxtTienThueNT = new C1NumericEdit();
            this.TxtTienHangNT = new C1NumericEdit();
            this.TxtTienThue = new C1NumericEdit();
            this.TxtTienHang = new C1NumericEdit();
            this.Label22 = new Label();
            this.Label5 = new Label();
            this.CmdDelRow = new Button();
            this.CmdAddRow = new Button();
            this.CboDaiDien = new ComboBox();
            this.AdvDoiTuong = new ADVObjects();
            this.ToolStrip1.SuspendLayout();
            this.Panel1.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab2).BeginInit();
            this.C1DockingTab2.SuspendLayout();
            this.C1DockingTabPage2.SuspendLayout();
            this.Panel2.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            ((ISupportInitialize) this.txtTyLeThue).BeginInit();
            ((ISupportInitialize) this.txtTyGia).BeginInit();
            this.Panel3.SuspendLayout();
            ((ISupportInitialize) this.C1DockingTab3).BeginInit();
            this.C1DockingTab3.SuspendLayout();
            this.C1DockingTabPage3.SuspendLayout();
            this.VSlist.BeginInit();
            this.Panel4.SuspendLayout();
            this.Panel5.SuspendLayout();
            ((ISupportInitialize) this.TxtTongThanhToanNT).BeginInit();
            ((ISupportInitialize) this.TxtTongThanhToan).BeginInit();
            ((ISupportInitialize) this.TxtTienThueNT).BeginInit();
            ((ISupportInitialize) this.TxtTienHangNT).BeginInit();
            ((ISupportInitialize) this.TxtTienThue).BeginInit();
            ((ISupportInitialize) this.TxtTienHang).BeginInit();
            this.SuspendLayout();
            this.ToolStrip1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgbluenoborder;
            this.ToolStrip1.Items.AddRange(new ToolStripItem[] { this.CmdAdd, this.CmdEdit, this.ToolStripSeparator2, this.CmdSave, this.CmdUnsave, this.ToolStripSeparator1, this.CmdFind, this.CmdPrint, this.ToolStripButton1, this.CmdDel, this.ToolStripSeparator3, this.CmdExit, this.CmdHelp });
            Point point = new Point(0, 0);
            this.ToolStrip1.Location = point;
            this.ToolStrip1.Name = "ToolStrip1";
            Size size = new Size(890, 0x19);
            this.ToolStrip1.Size = size;
            this.ToolStrip1.TabIndex = 1;
            this.ToolStrip1.Text = "ToolStrip1";
            this.CmdAdd.Image = (Image) manager.GetObject("CmdAdd.Image");
            this.CmdAdd.ImageTransparentColor = Color.White;
            this.CmdAdd.Name = "CmdAdd";
            size = new Size(0x52, 0x16);
            this.CmdAdd.Size = size;
            this.CmdAdd.Text = "&Th\x00eam mới";
            this.CmdAdd.ToolTipText = "F8 Th\x00eam mới bảng b\x00e1o gi\x00e1";
            this.CmdEdit.Image = (Image) manager.GetObject("CmdEdit.Image");
            this.CmdEdit.ImageTransparentColor = Color.White;
            this.CmdEdit.Name = "CmdEdit";
            size = new Size(0x2e, 0x16);
            this.CmdEdit.Size = size;
            this.CmdEdit.Text = "&Sửa";
            this.CmdEdit.ToolTipText = "F2 Chỉnh sửa bảng b\x00e1o gi\x00e1";
            this.ToolStripSeparator2.Name = "ToolStripSeparator2";
            size = new Size(6, 0x19);
            this.ToolStripSeparator2.Size = size;
            this.CmdSave.Image = (Image) manager.GetObject("CmdSave.Image");
            this.CmdSave.ImageTransparentColor = Color.WhiteSmoke;
            this.CmdSave.Name = "CmdSave";
            size = new Size(0x2f, 0x16);
            this.CmdSave.Size = size;
            this.CmdSave.Text = "&Lưu";
            this.CmdSave.ToolTipText = "F10 Lưu th\x00f4ng tin thay đổi";
            this.CmdUnsave.Image = (Image) manager.GetObject("CmdUnsave.Image");
            this.CmdUnsave.ImageTransparentColor = Color.White;
            this.CmdUnsave.Name = "CmdUnsave";
            size = new Size(0x39, 0x16);
            this.CmdUnsave.Size = size;
            this.CmdUnsave.Text = "&K.Lưu";
            this.CmdUnsave.ToolTipText = "F11 Kh\x00f4ng lưu th\x00f4ng tin thay đổi";
            this.ToolStripSeparator1.Name = "ToolStripSeparator1";
            size = new Size(6, 0x19);
            this.ToolStripSeparator1.Size = size;
            this.CmdFind.Image = (Image) manager.GetObject("CmdFind.Image");
            this.CmdFind.ImageTransparentColor = Color.White;
            this.CmdFind.Name = "CmdFind";
            size = new Size(0x4d, 0x16);
            this.CmdFind.Size = size;
            this.CmdFind.Tag = "HD-0001";
            this.CmdFind.Text = "T\x00ecm kiếm";
            this.CmdFind.ToolTipText = "F3 T\x00ecm kiếm bảng b\x00e1o gi\x00e1";
            this.CmdPrint.Image = (Image) manager.GetObject("CmdPrint.Image");
            this.CmdPrint.ImageTransparentColor = Color.White;
            this.CmdPrint.Name = "CmdPrint";
            size = new Size(0x25, 0x16);
            this.CmdPrint.Size = size;
            this.CmdPrint.Text = "&In";
            this.CmdPrint.ToolTipText = "F12 In bảng b\x00e1o gi\x00e1";
            this.ToolStripButton1.Name = "ToolStripButton1";
            size = new Size(6, 0x19);
            this.ToolStripButton1.Size = size;
            this.CmdDel.Image = (Image) manager.GetObject("CmdDel.Image");
            this.CmdDel.ImageTransparentColor = Color.White;
            this.CmdDel.Name = "CmdDel";
            size = new Size(0x2f, 0x16);
            this.CmdDel.Size = size;
            this.CmdDel.Text = "&X\x00f3a";
            this.CmdDel.ToolTipText = "F9 X\x00f3a bảng b\x00e1o gi\x00e1";
            this.ToolStripSeparator3.Name = "ToolStripSeparator3";
            size = new Size(6, 0x19);
            this.ToolStripSeparator3.Size = size;
            this.CmdExit.Alignment = ToolStripItemAlignment.Right;
            this.CmdExit.Image = (Image) manager.GetObject("CmdExit.Image");
            this.CmdExit.ImageTransparentColor = Color.White;
            this.CmdExit.Name = "CmdExit";
            size = new Size(0x3a, 0x16);
            this.CmdExit.Size = size;
            this.CmdExit.Text = "Th&o\x00e1t";
            this.CmdHelp.Alignment = ToolStripItemAlignment.Right;
            this.CmdHelp.Image = (Image) manager.GetObject("CmdHelp.Image");
            this.CmdHelp.ImageTransparentColor = Color.Magenta;
            this.CmdHelp.Name = "CmdHelp";
            size = new Size(0x34, 0x16);
            this.CmdHelp.Size = size;
            this.CmdHelp.Text = "&Help";
            this.Panel1.Controls.Add(this.C1DockingTab2);
            this.Panel1.Controls.Add(this.Panel2);
            this.Panel1.Dock = DockStyle.Top;
            point = new Point(0, 0x19);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(890, 0xc1);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x2f;
            this.C1DockingTab2.Controls.Add(this.C1DockingTabPage2);
            this.C1DockingTab2.Dock = DockStyle.Fill;
            point = new Point(0x1b0, 0);
            this.C1DockingTab2.Location = point;
            this.C1DockingTab2.Name = "C1DockingTab2";
            size = new Size(0x1ca, 0xc1);
            this.C1DockingTab2.Size = size;
            this.C1DockingTab2.TabIndex = 0;
            this.C1DockingTab2.TabsSpacing = 5;
            this.C1DockingTab2.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab2.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab2.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage2.Controls.Add(this.CboDaiDien);
            this.C1DockingTabPage2.Controls.Add(this.txtDienThoai);
            this.C1DockingTabPage2.Controls.Add(this.txtFax);
            this.C1DockingTabPage2.Controls.Add(this.Label15);
            this.C1DockingTabPage2.Controls.Add(this.Label14);
            this.C1DockingTabPage2.Controls.Add(this.txtMST);
            this.C1DockingTabPage2.Controls.Add(this.Label13);
            this.C1DockingTabPage2.Controls.Add(this.txtDiaChi);
            this.C1DockingTabPage2.Controls.Add(this.Label12);
            this.C1DockingTabPage2.Controls.Add(this.txtChucVu);
            this.C1DockingTabPage2.Controls.Add(this.Label11);
            this.C1DockingTabPage2.Controls.Add(this.Label9);
            this.C1DockingTabPage2.Controls.Add(this.Label8);
            this.C1DockingTabPage2.Controls.Add(this.AdvDoiTuong);
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(0x1c8, 0xa7);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 0;
            this.C1DockingTabPage2.Text = "B\x00ean b\x00e1n";
            point = new Point(0x58, 0x89);
            this.txtDienThoai.Location = point;
            this.txtDienThoai.Name = "txtDienThoai";
            size = new Size(0xa9, 20);
            this.txtDienThoai.Size = size;
            this.txtDienThoai.TabIndex = 10;
            point = new Point(0x12b, 0x89);
            this.txtFax.Location = point;
            this.txtFax.Name = "txtFax";
            size = new Size(0x92, 20);
            this.txtFax.Size = size;
            this.txtFax.TabIndex = 12;
            this.Label15.AutoSize = true;
            this.Label15.BackColor = Color.Transparent;
            point = new Point(0x10d, 140);
            this.Label15.Location = point;
            this.Label15.Name = "Label15";
            size = new Size(0x18, 13);
            this.Label15.Size = size;
            this.Label15.TabIndex = 11;
            this.Label15.Text = "Fax";
            this.Label14.AutoSize = true;
            this.Label14.BackColor = Color.Transparent;
            point = new Point(7, 140);
            this.Label14.Location = point;
            this.Label14.Name = "Label14";
            size = new Size(0x37, 13);
            this.Label14.Size = size;
            this.Label14.TabIndex = 9;
            this.Label14.Text = "Điện thoại";
            point = new Point(0x58, 110);
            this.txtMST.Location = point;
            this.txtMST.Name = "txtMST";
            size = new Size(0x165, 20);
            this.txtMST.Size = size;
            this.txtMST.TabIndex = 8;
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new Point(7, 0x71);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(60, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 7;
            this.Label13.Text = "M\x00e3 số thuế";
            point = new Point(0x58, 0x56);
            this.txtDiaChi.Location = point;
            this.txtDiaChi.Multiline = true;
            this.txtDiaChi.Name = "txtDiaChi";
            size = new Size(0x165, 20);
            this.txtDiaChi.Size = size;
            this.txtDiaChi.TabIndex = 6;
            this.Label12.AutoSize = true;
            this.Label12.BackColor = Color.Transparent;
            point = new Point(7, 0x59);
            this.Label12.Location = point;
            this.Label12.Name = "Label12";
            size = new Size(40, 13);
            this.Label12.Size = size;
            this.Label12.TabIndex = 5;
            this.Label12.Text = "Địa chỉ";
            point = new Point(0x58, 60);
            this.txtChucVu.Location = point;
            this.txtChucVu.Name = "txtChucVu";
            size = new Size(0x165, 20);
            this.txtChucVu.Size = size;
            this.txtChucVu.TabIndex = 4;
            this.Label11.AutoSize = true;
            this.Label11.BackColor = Color.Transparent;
            point = new Point(7, 0x3f);
            this.Label11.Location = point;
            this.Label11.Name = "Label11";
            size = new Size(0x2f, 13);
            this.Label11.Size = size;
            this.Label11.TabIndex = 3;
            this.Label11.Text = "Chức vụ";
            this.Label9.AutoSize = true;
            this.Label9.BackColor = Color.Transparent;
            point = new Point(7, 0x25);
            this.Label9.Location = point;
            this.Label9.Name = "Label9";
            size = new Size(0x2e, 13);
            this.Label9.Size = size;
            this.Label9.TabIndex = 0x31;
            this.Label9.Text = "Đại diện";
            this.Label8.AutoSize = true;
            this.Label8.BackColor = Color.Transparent;
            point = new Point(7, 11);
            this.Label8.Location = point;
            this.Label8.Name = "Label8";
            size = new Size(0x4b, 13);
            this.Label8.Size = size;
            this.Label8.TabIndex = 0;
            this.Label8.Text = "Nh\x00e0 cung cấp";
            this.Panel2.Controls.Add(this.C1DockingTab1);
            this.Panel2.Dock = DockStyle.Left;
            point = new Point(0, 0);
            this.Panel2.Location = point;
            this.Panel2.Name = "Panel2";
            size = new Size(0x1b0, 0xc1);
            this.Panel2.Size = size;
            this.Panel2.TabIndex = 0;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Dock = DockStyle.Fill;
            point = new Point(0, 0);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            size = new Size(0x1b0, 0xc1);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabIndex = 0;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.txtTyLeThue);
            this.C1DockingTabPage1.Controls.Add(this.Label4);
            this.C1DockingTabPage1.Controls.Add(this.txtTyGia);
            this.C1DockingTabPage1.Controls.Add(this.Label10);
            this.C1DockingTabPage1.Controls.Add(this.CboHinhThucThanhToan);
            this.C1DockingTabPage1.Controls.Add(this.CboLoaiTien);
            this.C1DockingTabPage1.Controls.Add(this.txtNgayThanhLy);
            this.C1DockingTabPage1.Controls.Add(this.Label17);
            this.C1DockingTabPage1.Controls.Add(this.txtNgayThanhToan);
            this.C1DockingTabPage1.Controls.Add(this.Label7);
            this.C1DockingTabPage1.Controls.Add(this.txtNgayHopDong);
            this.C1DockingTabPage1.Controls.Add(this.Label3);
            this.C1DockingTabPage1.Controls.Add(this.Label2);
            this.C1DockingTabPage1.Controls.Add(this.Label6);
            this.C1DockingTabPage1.Controls.Add(this.txtSoHD);
            this.C1DockingTabPage1.Controls.Add(this.Label1);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(430, 0xa7);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "Th\x00f4ng tin hợp đồng";
            this.txtTyLeThue.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyLeThue.DataType = typeof(double);
            this.txtTyLeThue.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x67, 0x5e);
            this.txtTyLeThue.Location = point;
            this.txtTyLeThue.Name = "txtTyLeThue";
            size = new Size(100, 0x12);
            this.txtTyLeThue.Size = size;
            this.txtTyLeThue.TabIndex = 11;
            this.txtTyLeThue.Tag = null;
            this.txtTyLeThue.TextAlign = HorizontalAlignment.Right;
            this.txtTyLeThue.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            point = new Point(12, 0x60);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x36, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 10;
            this.Label4.Text = "Tỷ lệ thuế";
            this.Label4.TextAlign = ContentAlignment.TopRight;
            this.txtTyGia.BorderStyle = BorderStyle.FixedSingle;
            this.txtTyGia.DataType = typeof(double);
            this.txtTyGia.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x12d, 0x26);
            this.txtTyGia.Location = point;
            this.txtTyGia.Name = "txtTyGia";
            size = new Size(100, 0x12);
            this.txtTyGia.Size = size;
            this.txtTyGia.TabIndex = 7;
            this.txtTyGia.Tag = null;
            this.txtTyGia.TextAlign = HorizontalAlignment.Right;
            this.txtTyGia.VisibleButtons = DropDownControlButtonFlags.DropDown;
            this.Label10.AutoSize = true;
            this.Label10.BackColor = Color.Transparent;
            point = new Point(0xd6, 0x2b);
            this.Label10.Location = point;
            this.Label10.Name = "Label10";
            size = new Size(0x24, 13);
            this.Label10.Size = size;
            this.Label10.TabIndex = 6;
            this.Label10.Text = "Tỷ gi\x00e1";
            this.Label10.TextAlign = ContentAlignment.TopRight;
            this.CboHinhThucThanhToan.FormattingEnabled = true;
            point = new Point(0x67, 0x40);
            this.CboHinhThucThanhToan.Location = point;
            this.CboHinhThucThanhToan.Name = "CboHinhThucThanhToan";
            size = new Size(0x12a, 0x15);
            this.CboHinhThucThanhToan.Size = size;
            this.CboHinhThucThanhToan.TabIndex = 9;
            this.CboLoaiTien.FormattingEnabled = true;
            point = new Point(0x67, 0x25);
            this.CboLoaiTien.Location = point;
            this.CboLoaiTien.Name = "CboLoaiTien";
            size = new Size(100, 0x15);
            this.CboLoaiTien.Size = size;
            this.CboLoaiTien.TabIndex = 5;
            this.txtNgayThanhLy.Format = DateTimePickerFormat.Short;
            point = new Point(0x12d, 0x74);
            this.txtNgayThanhLy.Location = point;
            this.txtNgayThanhLy.Name = "txtNgayThanhLy";
            size = new Size(100, 20);
            this.txtNgayThanhLy.Size = size;
            this.txtNgayThanhLy.TabIndex = 15;
            this.Label17.AutoSize = true;
            this.Label17.BackColor = Color.Transparent;
            point = new Point(0xd6, 0x77);
            this.Label17.Location = point;
            this.Label17.Name = "Label17";
            size = new Size(0x48, 13);
            this.Label17.Size = size;
            this.Label17.TabIndex = 14;
            this.Label17.Text = "Ng\x00e0y thanh l\x00fd";
            this.txtNgayThanhToan.Format = DateTimePickerFormat.Short;
            point = new Point(0x67, 0x74);
            this.txtNgayThanhToan.Location = point;
            this.txtNgayThanhToan.Name = "txtNgayThanhToan";
            size = new Size(100, 20);
            this.txtNgayThanhToan.Size = size;
            this.txtNgayThanhToan.TabIndex = 13;
            this.Label7.AutoSize = true;
            this.Label7.BackColor = Color.Transparent;
            point = new Point(11, 0x77);
            this.Label7.Location = point;
            this.Label7.Name = "Label7";
            size = new Size(0x56, 13);
            this.Label7.Size = size;
            this.Label7.TabIndex = 12;
            this.Label7.Text = "Ng\x00e0y thanh to\x00e1n";
            this.txtNgayHopDong.Format = DateTimePickerFormat.Short;
            point = new Point(0x12d, 8);
            this.txtNgayHopDong.Location = point;
            this.txtNgayHopDong.Name = "txtNgayHopDong";
            size = new Size(100, 20);
            this.txtNgayHopDong.Size = size;
            this.txtNgayHopDong.TabIndex = 3;
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new Point(12, 0x44);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(70, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 8;
            this.Label3.Text = "H\x00ecnh thức TT";
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new Point(0xd1, 11);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x51, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 2;
            this.Label2.Text = "Ng\x00e0y hợp đồng";
            this.Label6.AutoSize = true;
            this.Label6.BackColor = Color.Transparent;
            point = new Point(12, 0x29);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x2f, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 4;
            this.Label6.Text = "Loại tiền";
            point = new Point(0x67, 8);
            this.txtSoHD.Location = point;
            this.txtSoHD.Name = "txtSoHD";
            size = new Size(100, 20);
            this.txtSoHD.Size = size;
            this.txtSoHD.TabIndex = 1;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new Point(11, 11);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x45, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0;
            this.Label1.Text = "Số hợp đồng";
            this.Label16.AutoSize = true;
            this.Label16.BackColor = Color.Transparent;
            point = new Point(12, 15);
            this.Label16.Location = point;
            this.Label16.Name = "Label16";
            size = new Size(0x30, 13);
            this.Label16.Size = size;
            this.Label16.TabIndex = 0;
            this.Label16.Text = "Diễn giải";
            point = new Point(0x43, 3);
            this.txtDienGiai.Location = point;
            this.txtDienGiai.Multiline = true;
            this.txtDienGiai.Name = "txtDienGiai";
            size = new Size(0x32b, 0x25);
            this.txtDienGiai.Size = size;
            this.txtDienGiai.TabIndex = 1;
            this.Panel3.BackColor = Color.Transparent;
            this.Panel3.Controls.Add(this.txtDienGiai);
            this.Panel3.Controls.Add(this.Label16);
            this.Panel3.Dock = DockStyle.Top;
            point = new Point(0, 0xda);
            this.Panel3.Location = point;
            this.Panel3.Name = "Panel3";
            size = new Size(890, 0x2c);
            this.Panel3.Size = size;
            this.Panel3.TabIndex = 2;
            this.C1DockingTab3.Controls.Add(this.C1DockingTabPage3);
            this.C1DockingTab3.Dock = DockStyle.Fill;
            point = new Point(0, 0x106);
            this.C1DockingTab3.Location = point;
            this.C1DockingTab3.Name = "C1DockingTab3";
            size = new Size(890, 200);
            this.C1DockingTab3.Size = size;
            this.C1DockingTab3.TabIndex = 3;
            this.C1DockingTab3.TabsSpacing = 5;
            this.C1DockingTab3.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab3.VisualStyle = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTab3.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage3.Controls.Add(this.VSlist);
            this.C1DockingTabPage3.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new Point(1, 0x19);
            this.C1DockingTabPage3.Location = point;
            this.C1DockingTabPage3.Name = "C1DockingTabPage3";
            size = new Size(0x378, 0xae);
            this.C1DockingTabPage3.Size = size;
            this.C1DockingTabPage3.TabIndex = 0;
            this.C1DockingTabPage3.Text = "Chi tiết h\x00e0ng h\x00f3a";
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.XpThemes;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.FocusRect = FocusRectEnum.Solid;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new Point(0, 0);
            this.VSlist.Location = point;
            Padding padding = new Padding(0);
            this.VSlist.Margin = padding;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.Rows.MaxSize = 20;
            this.VSlist.Rows.MinSize = 20;
            size = new Size(0x378, 0xae);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 1;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            this.Panel4.BackColor = Color.Transparent;
            this.Panel4.Controls.Add(this.Panel5);
            this.Panel4.Controls.Add(this.CmdDelRow);
            this.Panel4.Controls.Add(this.CmdAddRow);
            this.Panel4.Dock = DockStyle.Bottom;
            point = new Point(0, 0x1ce);
            this.Panel4.Location = point;
            this.Panel4.Name = "Panel4";
            size = new Size(890, 0x4d);
            this.Panel4.Size = size;
            this.Panel4.TabIndex = 4;
            this.Panel5.Controls.Add(this.TxtTongThanhToanNT);
            this.Panel5.Controls.Add(this.TxtTongThanhToan);
            this.Panel5.Controls.Add(this.Label23);
            this.Panel5.Controls.Add(this.TxtTienThueNT);
            this.Panel5.Controls.Add(this.TxtTienHangNT);
            this.Panel5.Controls.Add(this.TxtTienThue);
            this.Panel5.Controls.Add(this.TxtTienHang);
            this.Panel5.Controls.Add(this.Label22);
            this.Panel5.Controls.Add(this.Label5);
            this.Panel5.Dock = DockStyle.Right;
            point = new Point(0x24a, 0);
            this.Panel5.Location = point;
            this.Panel5.Name = "Panel5";
            size = new Size(0x130, 0x4d);
            this.Panel5.Size = size;
            this.Panel5.TabIndex = 0;
            this.TxtTongThanhToanNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongThanhToanNT.DataType = typeof(double);
            this.TxtTongThanhToanNT.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x57, 0x35);
            this.TxtTongThanhToanNT.Location = point;
            this.TxtTongThanhToanNT.Name = "TxtTongThanhToanNT";
            padding = new Padding(1);
            this.TxtTongThanhToanNT.Padding = padding;
            this.TxtTongThanhToanNT.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTongThanhToanNT.Size = size;
            this.TxtTongThanhToanNT.TabIndex = 7;
            this.TxtTongThanhToanNT.Tag = null;
            this.TxtTongThanhToanNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTongThanhToanNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongThanhToanNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongThanhToanNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongThanhToan.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTongThanhToan.DataType = typeof(double);
            this.TxtTongThanhToan.FormatType = FormatTypeEnum.Currency;
            point = new Point(0xc3, 0x35);
            this.TxtTongThanhToan.Location = point;
            this.TxtTongThanhToan.Name = "TxtTongThanhToan";
            padding = new Padding(1);
            this.TxtTongThanhToan.Padding = padding;
            this.TxtTongThanhToan.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTongThanhToan.Size = size;
            this.TxtTongThanhToan.TabIndex = 8;
            this.TxtTongThanhToan.Tag = null;
            this.TxtTongThanhToan.TextAlign = HorizontalAlignment.Right;
            this.TxtTongThanhToan.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTongThanhToan.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTongThanhToan.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label23.AutoSize = true;
            this.Label23.BackColor = Color.Transparent;
            point = new Point(2, 0x38);
            this.Label23.Location = point;
            this.Label23.Name = "Label23";
            size = new Size(0x3b, 13);
            this.Label23.Size = size;
            this.Label23.TabIndex = 6;
            this.Label23.Text = "Tổng cộng";
            this.TxtTienThueNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienThueNT.DataType = typeof(double);
            this.TxtTienThueNT.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x57, 0x20);
            this.TxtTienThueNT.Location = point;
            this.TxtTienThueNT.Name = "TxtTienThueNT";
            padding = new Padding(1);
            this.TxtTienThueNT.Padding = padding;
            this.TxtTienThueNT.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTienThueNT.Size = size;
            this.TxtTienThueNT.TabIndex = 4;
            this.TxtTienThueNT.Tag = null;
            this.TxtTienThueNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTienThueNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienThueNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienThueNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHangNT.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienHangNT.DataType = typeof(double);
            this.TxtTienHangNT.FormatType = FormatTypeEnum.Currency;
            point = new Point(0x56, 6);
            this.TxtTienHangNT.Location = point;
            this.TxtTienHangNT.Name = "TxtTienHangNT";
            padding = new Padding(1);
            this.TxtTienHangNT.Padding = padding;
            this.TxtTienHangNT.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTienHangNT.Size = size;
            this.TxtTienHangNT.TabIndex = 1;
            this.TxtTienHangNT.Tag = null;
            this.TxtTienHangNT.TextAlign = HorizontalAlignment.Right;
            this.TxtTienHangNT.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienHangNT.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHangNT.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienThue.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienThue.DataType = typeof(double);
            this.TxtTienThue.FormatType = FormatTypeEnum.Currency;
            point = new Point(0xc3, 0x20);
            this.TxtTienThue.Location = point;
            this.TxtTienThue.Name = "TxtTienThue";
            padding = new Padding(1);
            this.TxtTienThue.Padding = padding;
            this.TxtTienThue.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTienThue.Size = size;
            this.TxtTienThue.TabIndex = 5;
            this.TxtTienThue.Tag = null;
            this.TxtTienThue.TextAlign = HorizontalAlignment.Right;
            this.TxtTienThue.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienThue.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienThue.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHang.BorderStyle = BorderStyle.FixedSingle;
            this.TxtTienHang.DataType = typeof(double);
            this.TxtTienHang.FormatType = FormatTypeEnum.Currency;
            point = new Point(0xc2, 6);
            this.TxtTienHang.Location = point;
            this.TxtTienHang.Name = "TxtTienHang";
            padding = new Padding(1);
            this.TxtTienHang.Padding = padding;
            this.TxtTienHang.ReadOnly = true;
            size = new Size(0x69, 20);
            this.TxtTienHang.Size = size;
            this.TxtTienHang.TabIndex = 2;
            this.TxtTienHang.Tag = null;
            this.TxtTienHang.TextAlign = HorizontalAlignment.Right;
            this.TxtTienHang.VisibleButtons = DropDownControlButtonFlags.None;
            this.TxtTienHang.VisualStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.TxtTienHang.VisualStyleBaseStyle = C1.Win.C1Input.VisualStyle.Office2007Blue;
            this.Label22.AutoSize = true;
            this.Label22.BackColor = Color.Transparent;
            point = new Point(2, 0x23);
            this.Label22.Location = point;
            this.Label22.Name = "Label22";
            size = new Size(0x34, 13);
            this.Label22.Size = size;
            this.Label22.TabIndex = 3;
            this.Label22.Text = "Tiền thuế";
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new Point(1, 10);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(60, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 0;
            this.Label5.Text = "Tổng trị gi\x00e1";
            this.CmdDelRow.Image = ACCOUNTING.My.Resources.Resources.Remove;
            this.CmdDelRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x70, 3);
            this.CmdDelRow.Location = point;
            this.CmdDelRow.Name = "CmdDelRow";
            size = new Size(100, 0x17);
            this.CmdDelRow.Size = size;
            this.CmdDelRow.TabIndex = 2;
            this.CmdDelRow.Text = "&2.X\x00f3a d\x00f2ng";
            this.CmdDelRow.UseVisualStyleBackColor = true;
            this.CmdAddRow.Image = ACCOUNTING.My.Resources.Resources.Adds;
            this.CmdAddRow.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(6, 3);
            this.CmdAddRow.Location = point;
            this.CmdAddRow.Name = "CmdAddRow";
            size = new Size(100, 0x17);
            this.CmdAddRow.Size = size;
            this.CmdAddRow.TabIndex = 1;
            this.CmdAddRow.Text = " &1.Th\x00eam d\x00f2ng";
            this.CmdAddRow.UseVisualStyleBackColor = true;
            this.CboDaiDien.FormattingEnabled = true;
            point = new Point(0x58, 0x22);
            this.CboDaiDien.Location = point;
            this.CboDaiDien.Name = "CboDaiDien";
            size = new Size(0x165, 0x15);
            this.CboDaiDien.Size = size;
            this.CboDaiDien.TabIndex = 2;
            this.AdvDoiTuong.Conditions = "";
            this.AdvDoiTuong.LoaiDoiTuong = modGeneral.TypeObjects.NhaCungCap;
            point = new Point(0x58, 8);
            this.AdvDoiTuong.Location = point;
            this.AdvDoiTuong.Name = "AdvDoiTuong";
            this.AdvDoiTuong.ReadOnly = false;
            size = new Size(0x165, 20);
            this.AdvDoiTuong.Size = size;
            this.AdvDoiTuong.TabIndex = 1;
            this.AdvDoiTuong.UpperText = true;
            this.AdvDoiTuong.Value = "";
            this.AdvDoiTuong.WidthCode = 80;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(890, 0x21b);
            this.ClientSize = size;
            this.Controls.Add(this.C1DockingTab3);
            this.Controls.Add(this.Panel3);
            this.Controls.Add(this.Panel1);
            this.Controls.Add(this.ToolStrip1);
            this.Controls.Add(this.Panel4);
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            this.Name = "Frm_HopDongMua";
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "HOP DONG MUA";
            this.ToolStrip1.ResumeLayout(false);
            this.ToolStrip1.PerformLayout();
            this.Panel1.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab2).EndInit();
            this.C1DockingTab2.ResumeLayout(false);
            this.C1DockingTabPage2.ResumeLayout(false);
            this.C1DockingTabPage2.PerformLayout();
            this.Panel2.ResumeLayout(false);
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            this.C1DockingTabPage1.PerformLayout();
            ((ISupportInitialize) this.txtTyLeThue).EndInit();
            ((ISupportInitialize) this.txtTyGia).EndInit();
            this.Panel3.ResumeLayout(false);
            this.Panel3.PerformLayout();
            ((ISupportInitialize) this.C1DockingTab3).EndInit();
            this.C1DockingTab3.ResumeLayout(false);
            this.C1DockingTabPage3.ResumeLayout(false);
            this.VSlist.EndInit();
            this.Panel4.ResumeLayout(false);
            this.Panel5.ResumeLayout(false);
            this.Panel5.PerformLayout();
            ((ISupportInitialize) this.TxtTongThanhToanNT).EndInit();
            ((ISupportInitialize) this.TxtTongThanhToan).EndInit();
            ((ISupportInitialize) this.TxtTienThueNT).EndInit();
            ((ISupportInitialize) this.TxtTienHangNT).EndInit();
            ((ISupportInitialize) this.TxtTienThue).EndInit();
            ((ISupportInitialize) this.TxtTienHang).EndInit();
            this.ResumeLayout(false);
            this.PerformLayout();
        }

        public void LoadDSDaiDien(string strKhoaDoiTuong)
        {
            clsDMLienHeDoiTuong tuong = new clsDMLienHeDoiTuong();
            DataTable list = new DataTable();
            list = tuong.GetList(strKhoaDoiTuong.Trim());
            this.CboDaiDien.DataSource = list;
            this.CboDaiDien.ValueMember = "Khoa";
            this.CboDaiDien.DisplayMember = "Ten";
        }

        public bool SaveDetails()
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim() == "")
                {
                    this.VSlist[i, 0] = modGeneral.CreatKey("CO_HopDongChiTiet", 15, "M");
                }
                clsHopDongChiTiet objHDCT = this.objHDCT;
                objHDCT.Khoa = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 0]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objHDCT.KhoaHopDong = this.cFrmKhoa;
                objHDCT.Ten = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 1]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objHDCT.SoLuong = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 2]), "", modGeneral.TypeOfValue.Nothing));
                objHDCT.DonViTinh = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 3]), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                objHDCT.DonGiaNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 4]), 0, modGeneral.TypeOfValue.Nothing));
                objHDCT.DonGia = objHDCT.DonGiaNT * Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                objHDCT.ThanhTienNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 5]), 0, modGeneral.TypeOfValue.Nothing));
                objHDCT.ThanhTien = objHDCT.ThanhTienNT * Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                objHDCT.ThueSuat = (int) Math.Round(Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 6]), 0, modGeneral.TypeOfValue.Nothing)));
                objHDCT.TienThueNT = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[i, 7]), 0, modGeneral.TypeOfValue.Nothing));
                objHDCT.TienThue = objHDCT.TienThueNT * Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
                if (!objHDCT.Save())
                {
                    return false;
                }
                objHDCT = null;
            }
            return true;
        }

        public void ShowData(string strKhoa)
        {
            if (this.objHD.Load(strKhoa))
            {
                clsHopDong objHD = this.objHD;
                this.cFrmKhoa = objHD.Khoa.Trim().Trim();
                this.txtSoHD.Text = objHD.SoHopDong.Trim();
                this.txtNgayHopDong.Text = LVYModule.Char2Date(objHD.NgayHopDong);
                this.CboLoaiTien.SelectedValue = objHD.LoaiTien.Trim();
                this.txtTyGia.Value = RuntimeHelpers.GetObjectValue(LVYModule.ReturnIfNull(objHD.TyGia, 1, modGeneral.TypeOfValue.Nothing));
                this.CboHinhThucThanhToan.SelectedValue = objHD.HinhThucTT.Trim();
                this.txtNgayThanhToan.Text = LVYModule.Char2Date(objHD.NgayThanhToan);
                this.txtNgayThanhLy.Text = LVYModule.Char2Date(objHD.NgayThanhLy);
                this.txtTyLeThue.Value = RuntimeHelpers.GetObjectValue(LVYModule.ReturnIfNull(objHD.TyLeThue, 0, modGeneral.TypeOfValue.Nothing));
                this.AdvDoiTuong.Value = objHD.DoiTuong.Trim();
                this.CboDaiDien.Text = objHD.DaiDien.Trim();
                this.txtChucVu.Text = objHD.ChucVu.Trim();
                this.txtDiaChi.Text = objHD.DiaChi.Trim();
                this.txtMST.Text = objHD.MaSoThue.Trim();
                this.txtDienThoai.Text = objHD.DienThoai.Trim();
                this.txtFax.Text = objHD.Fax.Trim();
                this.txtDienGiai.Text = objHD.DienGiai.Trim();
                this.TxtTienHangNT.Value = objHD.TongTriGiaNT;
                this.TxtTienHang.Value = objHD.TongTriGia;
                this.TxtTienThue.Value = objHD.TienThue;
                this.TxtTienThueNT.Value = objHD.TienThueNT;
                this.TxtTongThanhToan.Value = objHD.TongCong;
                this.TxtTongThanhToanNT.Value = objHD.TongCongNT;
                objHD = null;
                this.VSlist.Rows.Count = 1;
                DataTable listDetails = this.objHD.GetListDetails(this.cFrmKhoa);
                if (listDetails != null)
                {
                    int num2 = listDetails.Rows.Count - 1;
                    for (int i = 0; i <= num2; i++)
                    {
                        C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                        vSlist.AddItem("");
                        vSlist[vSlist.Rows.Count - 1, 0] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Khoa"]);
                        vSlist[vSlist.Rows.Count - 1, 1] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["Ten"]);
                        vSlist[vSlist.Rows.Count - 1, 2] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["SoLuong"]);
                        vSlist[vSlist.Rows.Count - 1, 3] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonViTinh"]);
                        vSlist[vSlist.Rows.Count - 1, 4] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["DonGiaNT"]);
                        vSlist[vSlist.Rows.Count - 1, 5] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["ThanhTienNT"]);
                        vSlist[vSlist.Rows.Count - 1, 6] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["ThueSuat"]);
                        vSlist[vSlist.Rows.Count - 1, 7] = RuntimeHelpers.GetObjectValue(listDetails.Rows[i]["TienThueNT"]);
                        vSlist = null;
                    }
                }
            }
        }

        public void TinhThue(int nRow)
        {
            double num = 0.0;
            int num2 = 0;
            num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 5]), 0, modGeneral.TypeOfValue.Nothing));
            num2 = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 6]), 0, modGeneral.TypeOfValue.Nothing));
            this.VSlist[nRow, 7] = Math.Round((double) ((num * num2) / 100.0), this.ObjLT.SoLe);
        }

        public void TinhTienHang(int nRow)
        {
            double num2 = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 2]), 0, modGeneral.TypeOfValue.Nothing));
            double num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[nRow, 4]), 0, modGeneral.TypeOfValue.Nothing));
            this.VSlist[nRow, 5] = num2 * num;
        }

        public void TinhTong()
        {
            double num = 0.0;
            num = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            this.TxtTienHangNT.Value = LVYModule.SumColGrid(this.VSlist, 5);
            this.TxtTienHang.Value = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienHangNT.Value), 0, modGeneral.TypeOfValue.Nothing)) * num;
            this.TxtTienThueNT.Value = LVYModule.SumColGrid(this.VSlist, 7);
            this.TxtTienThue.Value = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienThueNT.Value), 0, modGeneral.TypeOfValue.Nothing)) * num;
            this.TxtTongThanhToanNT.Value = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienHangNT.Value), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienThueNT.Value), 0, modGeneral.TypeOfValue.Nothing));
            this.TxtTongThanhToan.Value = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienHang.Value), 0, modGeneral.TypeOfValue.Nothing)) + Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.TxtTienThue.Value), 0, modGeneral.TypeOfValue.Nothing));
        }

        private void txtTyLeThue_ValueChanged(object sender, EventArgs e)
        {
            int num2 = this.VSlist.Rows.Count - 1;
            for (int i = 1; i <= num2; i++)
            {
                this.VSlist[i, 6] = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyLeThue.Value), 0, modGeneral.TypeOfValue.Nothing));
                RowColEventArgs args = new RowColEventArgs(i, 6);
                this.VSlist_AfterEdit(this.VSlist, args);
            }
        }

        public bool UpdateData()
        {
            bool flag=false;
            clsHopDong objHD = this.objHD;
            objHD.Khoa = this.cFrmKhoa;
            objHD.LoaiHopDong = "M";
            objHD.SoHopDong = this.txtSoHD.Text.Trim();
            objHD.NgayHopDong = LVYModule.Date2Char(this.txtNgayHopDong.Text);
            objHD.LoaiTien = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboLoaiTien.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            objHD.TyGia = Conversions.ToDouble(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyGia.Value), 1, modGeneral.TypeOfValue.Nothing));
            objHD.HinhThucTT = LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboHinhThucThanhToan.SelectedValue), "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            objHD.TyLeThue = Conversions.ToInteger(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyLeThue.Value), 0, modGeneral.TypeOfValue.Nothing));
            objHD.NgayThanhToan = LVYModule.Date2Char(this.txtNgayThanhToan.Text);
            objHD.NgayThanhLy = LVYModule.Date2Char(this.txtNgayThanhLy.Text);
            objHD.DoiTuong = LVYModule.ReturnIfNull(this.AdvDoiTuong.Value, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
            objHD.DaiDien = this.CboDaiDien.Text.Trim();
            objHD.ChucVu = this.txtChucVu.Text.Trim();
            objHD.DiaChi = this.txtDiaChi.Text.Trim();
            objHD.DienThoai = this.txtDienThoai.Text.Trim();
            objHD.MaSoThue = this.txtMST.Text.Trim();
            objHD.Fax = this.txtFax.Text.Trim();
            objHD.DienGiai = this.txtDienGiai.Text.Trim();
            objHD.TongTriGia = Conversions.ToDouble(this.TxtTienHang.Value);
            objHD.TongTriGiaNT = Conversions.ToDouble(this.TxtTienHangNT.Value);
            objHD.TienThue = Conversions.ToDouble(this.TxtTienThue.Value);
            objHD.TienThueNT = Conversions.ToDouble(this.TxtTienThueNT.Value);
            objHD.TongCong = Conversions.ToDouble(this.TxtTongThanhToan.Value);
            objHD.TongCongNT = Conversions.ToDouble(this.TxtTongThanhToanNT.Value);
            return objHD.Save();
            objHD = null;
            return flag;
        }

        private void VSlist_AfterEdit(object sender, RowColEventArgs e)
        {
            switch (e.Col)
            {
                case 1:
                    if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectLess(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 2]), 0, modGeneral.TypeOfValue.Nothing), 1, false))
                    {
                        this.VSlist[e.Row, 2] = 1;
                        this.VSlist[e.Row, 6] = RuntimeHelpers.GetObjectValue(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.txtTyLeThue.Value), 0, modGeneral.TypeOfValue.Nothing));
                        this.TinhThue(e.Row);
                    }
                    if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 5]), 0, modGeneral.TypeOfValue.Nothing), 0, false))
                    {
                        this.VSlist[e.Row, 5] = 0;
                    }
                    if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectEqual(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 7]), 0, modGeneral.TypeOfValue.Nothing), 0, false))
                    {
                        this.VSlist[e.Row, 7] = 0;
                    }
                    break;

                case 2:
                    if (Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectLess(LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.VSlist[e.Row, 2]), 0, modGeneral.TypeOfValue.Nothing), 1, false))
                    {
                        this.VSlist[e.Row, 2] = 1;
                    }
                    this.TinhTienHang(e.Row);
                    this.TinhThue(e.Row);
                    break;

                case 4:
                    this.TinhTienHang(e.Row);
                    this.TinhThue(e.Row);
                    break;

                case 6:
                    this.TinhThue(e.Row);
                    break;
            }
            this.TinhTong();
        }

        internal virtual ADVObjects AdvDoiTuong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._AdvDoiTuong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                ADVObjects.ValueChangedEventHandler handler = new ADVObjects.ValueChangedEventHandler(this.AdvDoiTuong_ValueChanged);
                if (this._AdvDoiTuong != null)
                {
                    this._AdvDoiTuong.ValueChanged -= handler;
                }
                this._AdvDoiTuong = value;
                if (this._AdvDoiTuong != null)
                {
                    this._AdvDoiTuong.ValueChanged += handler;
                }
            }
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab2 = value;
            }
        }

        internal virtual C1DockingTab C1DockingTab3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab3 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage3 = value;
            }
        }

        internal virtual ComboBox CboDaiDien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboDaiDien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboDaiDien_SelectedIndexChanged);
                if (this._CboDaiDien != null)
                {
                    this._CboDaiDien.SelectedIndexChanged -= handler;
                }
                this._CboDaiDien = value;
                if (this._CboDaiDien != null)
                {
                    this._CboDaiDien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ComboBox CboHinhThucThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboHinhThucThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboHinhThucThanhToan = value;
            }
        }

        internal virtual ComboBox CboLoaiTien
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboLoaiTien;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CboLoaiTien_SelectedIndexChanged);
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged -= handler;
                }
                this._CboLoaiTien = value;
                if (this._CboLoaiTien != null)
                {
                    this._CboLoaiTien.SelectedIndexChanged += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdAdd
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAdd;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAdd_Click);
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click -= handler;
                }
                this._CmdAdd = value;
                if (this._CmdAdd != null)
                {
                    this._CmdAdd.Click += handler;
                }
            }
        }

        internal virtual Button CmdAddRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdAddRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdAddRow_Click);
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click -= handler;
                }
                this._CmdAddRow = value;
                if (this._CmdAddRow != null)
                {
                    this._CmdAddRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdDel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdDel = value;
            }
        }

        internal virtual Button CmdDelRow
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdDelRow;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdDelRow_Click);
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click -= handler;
                }
                this._CmdDelRow = value;
                if (this._CmdDelRow != null)
                {
                    this._CmdDelRow.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdEdit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdEdit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdEdit_Click);
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click -= handler;
                }
                this._CmdEdit = value;
                if (this._CmdEdit != null)
                {
                    this._CmdEdit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdExit
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExit;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExit_Click);
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click -= handler;
                }
                this._CmdExit = value;
                if (this._CmdExit != null)
                {
                    this._CmdExit.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdFind
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdFind;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdFind_Click);
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click -= handler;
                }
                this._CmdFind = value;
                if (this._CmdFind != null)
                {
                    this._CmdFind.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdHelp
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdHelp;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdHelp = value;
            }
        }

        internal virtual ToolStripButton CmdPrint
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdPrint;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CmdPrint = value;
            }
        }

        internal virtual ToolStripButton CmdSave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdSave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdSave_Click);
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click -= handler;
                }
                this._CmdSave = value;
                if (this._CmdSave != null)
                {
                    this._CmdSave.Click += handler;
                }
            }
        }

        internal virtual ToolStripButton CmdUnsave
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdUnsave;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdUnsave_Click);
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click -= handler;
                }
                this._CmdUnsave = value;
                if (this._CmdUnsave != null)
                {
                    this._CmdUnsave.Click += handler;
                }
            }
        }

        public bool EnabledControl
        {
            get
            {
                return this.mEnabledControl;
            }
            set
            {
                this.mEnabledControl = value;
                this.CmdAdd.Enabled = !value & this.mAllowAdd;
                this.CmdEdit.Enabled = !value & this.mAllowEdit;
                this.CmdSave.Enabled = value;
                this.CmdUnsave.Enabled = value;
                this.CmdDel.Enabled = !value & this.mAllowDel;
                this.CmdFind.Enabled = !value;
                this.CmdExit.Enabled = !value;
                this.CmdAddRow.Enabled = value;
                this.CmdDelRow.Enabled = value;
                this.CmdPrint.Enabled = !value;
                this.txtSoHD.ReadOnly = !value;
                this.txtNgayHopDong.Enabled = value;
                this.txtNgayThanhToan.Enabled = value;
                this.txtNgayThanhLy.Enabled = value;
                this.CboLoaiTien.Enabled = value;
                this.txtTyGia.ReadOnly = !value;
                this.txtDienGiai.ReadOnly = !value;
                this.CboHinhThucThanhToan.Enabled = value;
                this.txtTyLeThue.ReadOnly = !value;
                this.AdvDoiTuong.ReadOnly = !value;
                this.CboDaiDien.Enabled = value;
                this.txtChucVu.ReadOnly = !value;
                this.txtDiaChi.ReadOnly = !value;
                this.txtMST.ReadOnly = !value;
                this.txtDienThoai.ReadOnly = !value;
                this.txtFax.ReadOnly = !value;
                this.VSlist.Enabled = value;
            }
        }

        internal virtual Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual Label Label10
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label10;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label10 = value;
            }
        }

        internal virtual Label Label11
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label11;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label11 = value;
            }
        }

        internal virtual Label Label12
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label12;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label12 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual Label Label14
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label14;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label14 = value;
            }
        }

        internal virtual Label Label15
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label15;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label15 = value;
            }
        }

        internal virtual Label Label16
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label16;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label16 = value;
            }
        }

        internal virtual Label Label17
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label17;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label17 = value;
            }
        }

        internal virtual Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual Label Label22
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label22;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label22 = value;
            }
        }

        internal virtual Label Label23
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label23;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label23 = value;
            }
        }

        internal virtual Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Label Label7
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label7;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label7 = value;
            }
        }

        internal virtual Label Label8
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label8;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label8 = value;
            }
        }

        internal virtual Label Label9
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label9;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label9 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual Panel Panel2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel2 = value;
            }
        }

        internal virtual Panel Panel3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel3 = value;
            }
        }

        internal virtual Panel Panel4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel4 = value;
            }
        }

        internal virtual Panel Panel5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel5 = value;
            }
        }

        internal virtual ToolStrip ToolStrip1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStrip1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStrip1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripButton1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripButton1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripButton1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator1 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator2 = value;
            }
        }

        internal virtual ToolStripSeparator ToolStripSeparator3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._ToolStripSeparator3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._ToolStripSeparator3 = value;
            }
        }

        internal virtual TextBox txtChucVu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtChucVu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtChucVu = value;
            }
        }

        internal virtual TextBox txtDiaChi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtDiaChi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtDiaChi = value;
            }
        }

        internal virtual TextBox txtDienGiai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtDienGiai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtDienGiai = value;
            }
        }

        internal virtual TextBox txtDienThoai
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtDienThoai;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtDienThoai = value;
            }
        }

        internal virtual TextBox txtFax
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtFax;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtFax = value;
            }
        }

        internal virtual TextBox txtMST
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtMST;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtMST = value;
            }
        }

        internal virtual DateTimePicker txtNgayHopDong
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtNgayHopDong;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtNgayHopDong = value;
            }
        }

        internal virtual DateTimePicker txtNgayThanhLy
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtNgayThanhLy;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtNgayThanhLy = value;
            }
        }

        internal virtual DateTimePicker txtNgayThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtNgayThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtNgayThanhToan = value;
            }
        }

        internal virtual TextBox txtSoHD
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtSoHD;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtSoHD = value;
            }
        }

        internal virtual C1NumericEdit TxtTienHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienHang = value;
            }
        }

        internal virtual C1NumericEdit TxtTienHangNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienHangNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienHangNT = value;
            }
        }

        internal virtual C1NumericEdit TxtTienThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienThue = value;
            }
        }

        internal virtual C1NumericEdit TxtTienThueNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTienThueNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTienThueNT = value;
            }
        }

        internal virtual C1NumericEdit TxtTongThanhToan
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongThanhToan;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongThanhToan = value;
            }
        }

        internal virtual C1NumericEdit TxtTongThanhToanNT
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTongThanhToanNT;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtTongThanhToanNT = value;
            }
        }

        internal virtual C1NumericEdit txtTyGia
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyGia;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._txtTyGia = value;
            }
        }

        internal virtual C1NumericEdit txtTyLeThue
        {
            [DebuggerNonUserCode]
            get
            {
                return this._txtTyLeThue;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.txtTyLeThue_ValueChanged);
                if (this._txtTyLeThue != null)
                {
                    this._txtTyLeThue.ValueChanged -= handler;
                }
                this._txtTyLeThue = value;
                if (this._txtTyLeThue != null)
                {
                    this._txtTyLeThue.ValueChanged += handler;
                }
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                RowColEventHandler handler = new RowColEventHandler(this.VSlist_AfterEdit);
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit -= handler;
                }
                this._VSlist = value;
                if (this._VSlist != null)
                {
                    this._VSlist.AfterEdit += handler;
                }
            }
        }
    }
}

